/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.store;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.C425;
import queenb.web.util.PackageContants;

/**
 *
 * @author Nguyen Hung
 */
public class C425Store extends C425{

    public List<C425> ccurpks_listoftabc425(int pnFH000, int pnFH200,int pvKV303, String pvLOGIN) {
        try {
            DataStatement data = new DataStatement(PackageContants.ccurpks_listoftabc425, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                         new Param(OracleTypes.INTEGER, pvKV303),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(data, C425.class);
        } catch (SQLException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    
    public int stdc_tools_inserttabc425(int pnPC425,int pnFH000, int pnFH200,String pvCV426, String pvCV427,String pvCV428,int pnCN429, String pvLOGIN) {
        DataStatement dataStetament = new DataStatement(PackageContants.stdc_tools_inserttabc425, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.INTEGER, pnPC425),                
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                     new Param(OracleTypes.CHAR, pvCV426),
                    new Param(OracleTypes.CHAR, pvCV427),
                     new Param(OracleTypes.CHAR, pvCV428),
                        new Param(OracleTypes.INTEGER, pnCN429),
                    new Param(OracleTypes.CHAR, pvLOGIN),});
        try {
            return super.update(dataStetament, C425.class);
        } catch (SQLException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    public int stdc_tools_stornotabc425(int pnPC425, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.stdc_tools_stornotabc425, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.INTEGER, pnPC425),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.update(dataStatement, C425.class);
        } catch (SQLException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }
    
     public List<C425> combcurpks_combtabc425(int pnFH000, int pnFH200, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.combcurpks_combtabc425, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                   //     new Param(OracleTypes.INTEGER, pnPC425),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, C425.class);
        } catch (SQLException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(C425Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

}
